<!DOCTYPE html>
<html>
<head>
    <title>预约时间表</title>
    <#include "/header.html"/>
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/datetimepicker/bootstrap-datetimepicker.css">
    <script src="${request.contextPath}/statics/plugins/datetimepicker/bootstrap-datetimepicker.js"></script>
    <script src="${request.contextPath}/statics/plugins/datetimepicker/locales/bootstrap-datetimepicker.zh-CN.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <form class="form-inline" role="form">
            <div class="form-group">
                <input type="text" class="form-control input-sm" v-model="queryCondition.companyName"
                       @keyup.enter="query" placeholder="检测点公司">
            </div>
            <div class="form-group">
                <input type="text" class="form-control input-sm" v-model="queryCondition.phone" @keyup.enter="query"
                       placeholder="手机号">
            </div>
            <div class="form-group">
                <input type="text" class="form-control input-sm" v-model="queryCondition.licensePlate"
                       @keyup.enter="query" placeholder="车牌号">
            </div>
            <div class="form-group input-group">
                <input type="text" class="form-control input-sm" id="startTime"
                       v-model="queryCondition.reservationTimeStart" @keyup.enter="query" placeholder="预约时间起">
                <span class="input-group-addon"></span>
                <input type="text" class="form-control input-sm" id="endTime"
                       v-model="queryCondition.reservationTimeEnd" @keyup.enter="query" placeholder="预约时间止">
            </div>
            <div class="form-group grid-btn">
                <a class="btn btn-primary" @click="query">查询</a>
                <#if shiro.hasPermission("cartrial:reservationtime:save")>
                <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>
            <#if shiro.hasPermission("cartrial:reservationtime:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
        </#if>
        <#if shiro.hasPermission("cartrial:reservationtime:delete")>
        <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
    </#if>
</div>
</form>
<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>

<div v-show="!showList" class="panel panel-default" align="center">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal" style="width:70%!important;">
        <div class="form-group">
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">检测点公司ID</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.companyId"
                           placeholder="检测点公司ID"/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">检测点公司名称</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.companyName"
                           placeholder="检测点公司名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">预约时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.reservationTime"
                           placeholder="预约时间"/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">预约状态</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.reservationState"
                           placeholder="预约状态（0未预约 1已预约 2检测中 10检测完成 -1爽约）"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">到达状态</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.arriveState"
                           placeholder="到达状态（0未到达1已到达）"/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">用户编号</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.userid"
                           placeholder="用户编号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">车牌号</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.licensePlate"
                           placeholder="车牌号"/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">手机号</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.phone"
                           placeholder="手机号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">创建时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.createTime"
                           placeholder="创建时间"/>
                </div>
                <div class="col-sm-2 control-label" style="width: 10%;">1</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.state"
                           placeholder="1"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label" style="width: 10%;">修改时间</div>
                <div class="col-sm-10" style="width: 40%;">
                    <input type="text" class="form-control" width="80%" v-model="reservationTime.modifyTime"
                           placeholder="修改时间"/>
                </div>
            </div>
        </div>
        <div class=modal-footer" style="text-align: center">
            <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
        &nbsp;      &nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/cartrial/reservationtime.js?_${.now?long}"></script>
</body>
</html>